
import request from '@/utils/request'

/**
 * 仪器
 */
/**
 * 新增仪器
 * @param data
 * @returns {AxiosPromise}
 */
export function saveEquipment(data) {
  return request({
    url: '/api/base/equipment/save',
    method: 'post',
    data
  })
}

/**
 * 修改仪器
 * @param data
 * @returns {AxiosPromise}
 */
export function updateEquipment(data) {
  return request({
    url: '/api/base/equipment/update',
    method: 'post',
    data
  })
}

/**
 * 修改仪器状态
 * @param data
 * @returns {AxiosPromise}
 */
export function updateEquipmentStatus(data) {
  return request({
    url: '/api/base/equipment/update_status',
    method: 'post',
    data
  })
}

/**
 * 删除仪器状态
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteEquipment(data) {
  return request({
    url: '/api/base/equipment/delete',
    method: 'post',
    data
  })
}

/**
 * 分页仪器模板
 * @param data
 * @returns {AxiosPromise}
 */
export function pageEquipment(data) {
  return request({
    url: '/api/base/equipment/page',
    method: 'post',
    data
  })
}

export function listPreOptions() {
  return request({
    url: '/api/base/equipment/list_pre_options',
    method: 'get'
  })
}

/**
 * 获取仪器设备
 * @param data
 * @returns {AxiosPromise}
 */
export function getEquipmentList(data) {
  return request({
    url: '/api/base/equipment/list',
    method: 'post',
    data
  })
}
